/*
 Navicat MySQL Data Transfer

 Source Server         : data
 Source Server Type    : MySQL
 Source Server Version : 80027
 Source Host           : localhost:3306
 Source Schema         : hq_org

 Target Server Type    : MySQL
 Target Server Version : 80027
 File Encoding         : 65001

 Date: 20/11/2022 20:08:53
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for oauth_client_details
-- ----------------------------
DROP TABLE IF EXISTS `oauth_client_details`;
CREATE TABLE `oauth_client_details` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `client_id` varchar(255) NOT NULL,
  `resource_ids` varchar(255) DEFAULT NULL,
  `client_secret` varchar(255) NOT NULL,
  `scope` varchar(255) NOT NULL,
  `authorized_grant_types` varchar(255) NOT NULL,
  `web_server_redirect_uri` varchar(255) DEFAULT NULL,
  `authorities` varchar(255) DEFAULT NULL,
  `access_token_validity` int NOT NULL,
  `refresh_token_validity` int DEFAULT NULL,
  `additional_information` varchar(4096) DEFAULT NULL,
  `autoapprove` tinyint DEFAULT NULL,
  `origin_secret` varchar(255) DEFAULT NULL,
  `create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='客户端配置';

-- ----------------------------
-- Records of oauth_client_details
-- ----------------------------
BEGIN;
INSERT INTO `oauth_client_details` VALUES (1, 'app', '', '$2a$10$8Qk/efslEpO1Af1kyw/rp.DdJGsdnET8UCp1vGDzpQEa.1qBklvua', 'all', 'refresh_token,password', '', NULL, 86400, 864000, NULL, NULL, '123456', '', NULL);
INSERT INTO `oauth_client_details` VALUES (2, 'hq', ' ', '$2a$10$aSZTvMOtUAYUQ.75z2n3ceJd6dCIk9Vy3J/SKZUE4hBLd6sz7.6ge', 'all', 'password,refresh_token', NULL, NULL, 86400, 8640000, NULL, 0, '123456', '', NULL);
COMMIT;

-- ----------------------------
-- Table structure for t_data_permission_test
-- ----------------------------
DROP TABLE IF EXISTS `t_data_permission_test`;
CREATE TABLE `t_data_permission_test` (
  `field1` varchar(20) NOT NULL,
  `field2` varchar(20) NOT NULL,
  `field3` varchar(20) NOT NULL,
  `field4` varchar(20) NOT NULL,
  `dept_id` int NOT NULL,
  `create_time` datetime NOT NULL,
  `id` bigint NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户权限测试';

-- ----------------------------
-- Records of t_data_permission_test
-- ----------------------------
BEGIN;
INSERT INTO `t_data_permission_test` VALUES ('小米', '小米10Pro', '4999', '珍珠白', 1, '2020-04-14 15:00:38', 1);
INSERT INTO `t_data_permission_test` VALUES ('腾讯', '黑鲨游戏手机3', '3799', '铠甲灰', 2, '2020-04-14 15:01:36', 2);
INSERT INTO `t_data_permission_test` VALUES ('华为', '华为P30', '3299', '天空之境', 1, '2020-04-14 15:03:11', 3);
INSERT INTO `t_data_permission_test` VALUES ('华为', '华为P40Pro', '6488', '亮黑色', 3, '2020-04-14 15:04:31', 4);
INSERT INTO `t_data_permission_test` VALUES ('vivo', 'Vivo iQOO 3', '3998', '拉力橙', 4, '2020-04-14 15:05:55', 5);
INSERT INTO `t_data_permission_test` VALUES ('一加', '一加7T', '3199', '冰际蓝', 5, '2020-04-14 15:06:53', 6);
INSERT INTO `t_data_permission_test` VALUES ('三星', '三星Galaxy S10', '4098', '浩玉白', 6, '2020-04-14 15:08:25', 7);
INSERT INTO `t_data_permission_test` VALUES ('苹果', 'iPhone 11 pro max', '9198', '暗夜绿', 4, '2020-04-14 15:09:20', 8);
COMMIT;

-- ----------------------------
-- Table structure for t_dept
-- ----------------------------
DROP TABLE IF EXISTS `t_dept`;
CREATE TABLE `t_dept` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '部门ID',
  `parent_id` bigint NOT NULL COMMENT '上级部门ID',
  `dept_name` varchar(100) NOT NULL COMMENT '部门名称',
  `order_num` int DEFAULT NULL COMMENT '排序',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `t_dept_parent_id` (`parent_id`),
  KEY `t_dept_dept_name` (`dept_name`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='部门';

-- ----------------------------
-- Records of t_dept
-- ----------------------------
BEGIN;
INSERT INTO `t_dept` VALUES (1, 0, '开发部', 1, '2018-01-04 15:42:26', '2019-01-05 21:08:27');
INSERT INTO `t_dept` VALUES (2, 1, '开发一部', 1, '2018-01-04 15:42:34', '2019-01-18 00:59:37');
INSERT INTO `t_dept` VALUES (3, 1, '开发二部', 2, '2018-01-04 15:42:29', '2019-01-05 14:09:39');
INSERT INTO `t_dept` VALUES (4, 0, '市场部', 2, '2018-01-04 15:42:36', '2019-01-23 06:27:56');
INSERT INTO `t_dept` VALUES (5, 0, '人事部', 3, '2018-01-04 15:42:32', '2019-01-23 06:27:59');
INSERT INTO `t_dept` VALUES (6, 0, '测试部', 4, '2018-01-04 15:42:38', '2019-01-17 08:15:47');
COMMIT;

-- ----------------------------
-- Table structure for t_file
-- ----------------------------
DROP TABLE IF EXISTS `t_file`;
CREATE TABLE `t_file` (
  `id` bigint NOT NULL COMMENT '文件ID',
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `url` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci COMMENT '访问链接',
  `file_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件名',
  `file_size` bigint NOT NULL COMMENT '文件大小',
  `bucket_name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '桶名称',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Table structure for t_job
-- ----------------------------
DROP TABLE IF EXISTS `t_job`;
CREATE TABLE `t_job` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务id',
  `bean_name` varchar(50) NOT NULL COMMENT 'spring bean名称',
  `method_name` varchar(50) NOT NULL COMMENT '方法名',
  `params` varchar(50) DEFAULT NULL COMMENT '参数',
  `cron_expression` varchar(20) NOT NULL COMMENT 'cron表达式',
  `status` char(2) NOT NULL COMMENT '任务状态  0：正常  1：暂停',
  `remark` varchar(50) DEFAULT NULL COMMENT '备注',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `t_job_create_time` (`create_time`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='定时任务';

-- ----------------------------
-- Records of t_job
-- ----------------------------
BEGIN;
INSERT INTO `t_job` VALUES (1, 'taskList', 'test', 'hello', '0/1 * * * * ?', '1', '有参任务调度测试', '2018-02-24 16:26:14');
INSERT INTO `t_job` VALUES (2, 'taskList', 'test1', NULL, '0/10 * * * * ?', '1', '无参任务调度测试', '2018-02-24 17:06:23');
INSERT INTO `t_job` VALUES (3, 'taskList', 'test2', '{\"name\":\"cix\",\"age\":18}', '0/1 * * * * ?', '1', 'JSON类型参数任务测试', '2018-02-26 09:28:26');
INSERT INTO `t_job` VALUES (4, 'taskList', 'test3', '', '0/5 * * * * ?', '1', '测试异常，没有编写test3任务', '2018-02-26 11:15:30');
INSERT INTO `t_job` VALUES (6, 'test3', 't1', 't', '0/1 * * * * ?', '1', 'ee', NULL);
COMMIT;

-- ----------------------------
-- Table structure for t_job_log
-- ----------------------------
DROP TABLE IF EXISTS `t_job_log`;
CREATE TABLE `t_job_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务日志id',
  `job_id` bigint NOT NULL COMMENT '任务id',
  `bean_name` varchar(100) NOT NULL COMMENT 'spring bean名称',
  `method_name` varchar(100) NOT NULL COMMENT '方法名',
  `params` varchar(200) DEFAULT NULL COMMENT '参数',
  `status` char(2) NOT NULL COMMENT '任务状态    0：成功    1：失败',
  `error` text COMMENT '失败信息',
  `times` decimal(11,0) DEFAULT NULL COMMENT '耗时(单位：毫秒)',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `t_job_log_create_time` (`create_time`)
) ENGINE=MyISAM AUTO_INCREMENT=297 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='调度日志';

-- ----------------------------
-- Records of t_job_log
-- ----------------------------
BEGIN;
INSERT INTO `t_job_log` VALUES (281, 1, 'taskList', 'test', 'hello', '0', NULL, 3, NULL);
INSERT INTO `t_job_log` VALUES (282, 1, 'taskList', 'test', 'hello', '0', NULL, 1, NULL);
INSERT INTO `t_job_log` VALUES (283, 1, 'taskList', 'test', 'hello', '0', NULL, 0, NULL);
INSERT INTO `t_job_log` VALUES (284, 1, 'taskList', 'test', 'hello', '0', NULL, 0, NULL);
INSERT INTO `t_job_log` VALUES (285, 1, 'taskList', 'test', 'hello', '0', NULL, 1, NULL);
INSERT INTO `t_job_log` VALUES (286, 1, 'taskList', 'test', 'hello', '0', NULL, 0, NULL);
INSERT INTO `t_job_log` VALUES (287, 1, 'taskList', 'test', 'hello', '0', NULL, 0, NULL);
INSERT INTO `t_job_log` VALUES (288, 1, 'taskList', 'test', 'hello', '0', NULL, 1, NULL);
INSERT INTO `t_job_log` VALUES (289, 1, 'taskList', 'test', 'hello', '0', NULL, 0, NULL);
INSERT INTO `t_job_log` VALUES (290, 3, 'taskList', 'test2', '{\"name\":\"cix\",\"age\":18}', '0', NULL, 14, NULL);
INSERT INTO `t_job_log` VALUES (291, 3, 'taskList', 'test2', '{\"name\":\"cix\",\"age\":18}', '0', NULL, 1, NULL);
INSERT INTO `t_job_log` VALUES (292, 3, 'taskList', 'test2', '{\"name\":\"cix\",\"age\":18}', '0', NULL, 1, NULL);
INSERT INTO `t_job_log` VALUES (293, 3, 'taskList', 'test2', '{\"name\":\"cix\",\"age\":18}', '0', NULL, 1, NULL);
INSERT INTO `t_job_log` VALUES (294, 3, 'taskList', 'test2', '{\"name\":\"cix\",\"age\":18}', '0', NULL, 0, NULL);
INSERT INTO `t_job_log` VALUES (295, 3, 'taskList', 'test2', '{\"name\":\"cix\",\"age\":18}', '0', NULL, 1, NULL);
INSERT INTO `t_job_log` VALUES (296, 3, 'taskList', 'test2', '{\"name\":\"cix\",\"age\":18}', '0', NULL, 0, NULL);
COMMIT;

-- ----------------------------
-- Table structure for t_log
-- ----------------------------
DROP TABLE IF EXISTS `t_log`;
CREATE TABLE `t_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '日志ID',
  `username` varchar(50) DEFAULT NULL COMMENT '操作用户',
  `operation` text COMMENT '操作内容',
  `time` decimal(11,0) DEFAULT NULL COMMENT '耗时',
  `method` text COMMENT '操作方法',
  `params` text COMMENT '方法参数',
  `ip` varchar(64) DEFAULT NULL COMMENT '操作者IP',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  `location` varchar(50) DEFAULT NULL COMMENT '操作地点',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `t_log_create_time` (`create_time`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='用户操作日志';

-- ----------------------------
-- Table structure for t_logger
-- ----------------------------
DROP TABLE IF EXISTS `t_logger`;
CREATE TABLE `t_logger` (
  `id` bigint NOT NULL AUTO_INCREMENT,
  `group_id` varchar(64) NOT NULL,
  `unit_id` varchar(32) NOT NULL,
  `tag` varchar(50) NOT NULL,
  `content` varchar(1024) NOT NULL,
  `create_time` varchar(30) NOT NULL,
  `app_name` varchar(128) NOT NULL,
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='分布式事务日志';

-- ----------------------------
-- Table structure for t_login_log
-- ----------------------------
DROP TABLE IF EXISTS `t_login_log`;
CREATE TABLE `t_login_log` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id',
  `username` varchar(50) NOT NULL COMMENT '用户名',
  `login_time` datetime NOT NULL COMMENT '登录时间',
  `location` varchar(50) DEFAULT NULL COMMENT '登录地点',
  `ip` varchar(50) DEFAULT NULL COMMENT 'IP地址',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `t_login_log_login_time` (`login_time`)
) ENGINE=MyISAM AUTO_INCREMENT=95 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='登录日志';

-- ----------------------------
-- Records of t_login_log
-- ----------------------------
BEGIN;
INSERT INTO `t_login_log` VALUES (93, 'hq', '2021-10-22 17:32:27', '127.0.0.1', '127.0.0.1');
INSERT INTO `t_login_log` VALUES (94, '15159398913', '2022-11-20 20:08:21', NULL, '127.0.0.1');
COMMIT;

-- ----------------------------
-- Table structure for t_menu
-- ----------------------------
DROP TABLE IF EXISTS `t_menu`;
CREATE TABLE `t_menu` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '菜单/按钮ID',
  `parent_id` bigint DEFAULT NULL COMMENT '上级菜单ID',
  `menu_name` varchar(50) NOT NULL COMMENT '菜单/按钮名称',
  `path` varchar(255) DEFAULT NULL COMMENT '对应路由path',
  `perms` varchar(50) DEFAULT NULL COMMENT '权限标识',
  `icon` varchar(50) DEFAULT NULL COMMENT '图标',
  `type` char(2) NOT NULL COMMENT '类型 0菜单 1按钮',
  `order_num` int DEFAULT NULL COMMENT '排序',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `t_menu_parent_id` (`parent_id`),
  KEY `t_menu_menu_id` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='菜单';

-- ----------------------------
-- Records of t_menu
-- ----------------------------
BEGIN;
INSERT INTO `t_menu` VALUES (2, 0, '系统管理', NULL, NULL, 'el-icon-s-operation', '0', 2, '2021-10-20 15:10:00', '2021-10-21 12:31:16');
INSERT INTO `t_menu` VALUES (3, 2, '用户管理', '/system/user', 'user:list', NULL, '0', 1, '2021-10-20 15:10:42', NULL);
INSERT INTO `t_menu` VALUES (4, 2, '菜单管理', '/system/menu', 'menu:list', NULL, '0', 2, '2021-10-20 15:10:42', NULL);
INSERT INTO `t_menu` VALUES (5, 2, '角色管理', '/system/role', 'role:list', NULL, '0', 3, '2021-10-20 15:10:42', NULL);
INSERT INTO `t_menu` VALUES (6, 2, '部门管理', '/system/dept', 'dept:list', NULL, '0', 4, '2021-10-20 15:10:42', NULL);
INSERT INTO `t_menu` VALUES (7, 2, '任务管理', '/system/job', 'job:list', NULL, '0', 5, '2021-10-20 15:10:42', NULL);
INSERT INTO `t_menu` VALUES (8, 3, '新增用户', NULL, 'user:add', NULL, '1', NULL, '2021-10-20 15:16:01', '2021-10-21 12:27:00');
INSERT INTO `t_menu` VALUES (9, 3, '修改用户', NULL, 'user:update', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (10, 3, '删除用户', NULL, 'user:delete', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (11, 5, '新增角色', NULL, 'role:add', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (12, 5, '修改角色', NULL, 'role:update', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (13, 5, '删除角色', NULL, 'role:delete', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (14, 4, '新增菜单', NULL, 'menu:add', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (15, 4, '修改菜单', NULL, 'menu:update', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (16, 4, '删除菜单', NULL, 'menu:delete', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (17, 6, '新增部门', NULL, 'dept:add', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (18, 6, '修改部门', NULL, 'dept:update', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (19, 6, '删除部门', NULL, 'dept:delete', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (20, 3, '密码重置', NULL, 'user:reset', NULL, '1', NULL, '2021-10-20 15:16:01', '2021-10-21 12:25:04');
INSERT INTO `t_menu` VALUES (21, 7, '新增任务', NULL, 'job:add', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (22, 7, '修改任务', NULL, 'job:update', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (23, 7, '删除任务', NULL, 'job:delete', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (24, 7, '暂停任务', NULL, 'job:pause', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (25, 7, '立即执行一次', NULL, 'job:run', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
INSERT INTO `t_menu` VALUES (26, 7, '恢复任务', NULL, 'job:resume', NULL, '1', NULL, '2021-10-20 15:16:01', NULL);
COMMIT;

-- ----------------------------
-- Table structure for t_role
-- ----------------------------
DROP TABLE IF EXISTS `t_role`;
CREATE TABLE `t_role` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  `role_name` varchar(10) NOT NULL COMMENT '角色名称',
  `remark` varchar(100) DEFAULT NULL COMMENT '角色描述',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='角色';

-- ----------------------------
-- Records of t_role
-- ----------------------------
BEGIN;
INSERT INTO `t_role` VALUES (1, '管理员', '管理员', '2017-12-27 16:23:11', '2020-04-15 14:02:27');
INSERT INTO `t_role` VALUES (2, '普通用户', '可查看，新增，导出', '2019-01-04 14:11:28', '2021-10-21 17:44:19');
COMMIT;

-- ----------------------------
-- Table structure for t_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `t_role_menu`;
CREATE TABLE `t_role_menu` (
  `role_id` bigint NOT NULL,
  `menu_id` bigint NOT NULL,
  PRIMARY KEY (`role_id`,`menu_id`),
  KEY `t_role_menu_menu_id` (`menu_id`),
  KEY `t_role_menu_role_id` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='角色菜单关联';

-- ----------------------------
-- Records of t_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `t_role_menu` VALUES (1, 2);
INSERT INTO `t_role_menu` VALUES (1, 3);
INSERT INTO `t_role_menu` VALUES (1, 4);
INSERT INTO `t_role_menu` VALUES (1, 5);
INSERT INTO `t_role_menu` VALUES (1, 6);
INSERT INTO `t_role_menu` VALUES (1, 7);
INSERT INTO `t_role_menu` VALUES (1, 8);
INSERT INTO `t_role_menu` VALUES (1, 9);
INSERT INTO `t_role_menu` VALUES (1, 10);
INSERT INTO `t_role_menu` VALUES (1, 11);
INSERT INTO `t_role_menu` VALUES (1, 12);
INSERT INTO `t_role_menu` VALUES (1, 13);
INSERT INTO `t_role_menu` VALUES (1, 14);
INSERT INTO `t_role_menu` VALUES (1, 15);
INSERT INTO `t_role_menu` VALUES (1, 16);
INSERT INTO `t_role_menu` VALUES (1, 17);
INSERT INTO `t_role_menu` VALUES (1, 18);
INSERT INTO `t_role_menu` VALUES (1, 19);
INSERT INTO `t_role_menu` VALUES (1, 20);
INSERT INTO `t_role_menu` VALUES (1, 21);
INSERT INTO `t_role_menu` VALUES (1, 22);
INSERT INTO `t_role_menu` VALUES (1, 23);
INSERT INTO `t_role_menu` VALUES (1, 24);
INSERT INTO `t_role_menu` VALUES (1, 25);
INSERT INTO `t_role_menu` VALUES (1, 26);
COMMIT;

-- ----------------------------
-- Table structure for t_user
-- ----------------------------
DROP TABLE IF EXISTS `t_user`;
CREATE TABLE `t_user` (
  `id` bigint NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `username` varchar(50) NOT NULL COMMENT '用户名',
  `password` varchar(128) NOT NULL COMMENT '密码',
  `dept_id` bigint DEFAULT NULL COMMENT '部门ID',
  `email` varchar(128) DEFAULT NULL COMMENT '邮箱',
  `mobile` varchar(20) DEFAULT NULL COMMENT '联系电话',
  `status` char(1) NOT NULL COMMENT '状态 0锁定 1有效',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '修改时间',
  `last_login_time` datetime DEFAULT NULL COMMENT '最近访问时间',
  `sex` char(1) DEFAULT NULL COMMENT '性别 0男 1女 2保密',
  `is_tab` char(1) DEFAULT NULL COMMENT '是否开启tab，0关闭 1开启',
  `theme` varchar(10) DEFAULT NULL COMMENT '主题',
  `avatar` varchar(100) DEFAULT NULL COMMENT '头像',
  `description` varchar(100) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `t_user_username` (`username`),
  KEY `t_user_mobile` (`mobile`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='用户';

-- ----------------------------
-- Records of t_user
-- ----------------------------
BEGIN;
INSERT INTO `t_user` VALUES (1, 'hq', '$2a$10$fJlitylw6VbicJg1JwL1ceAIX0STqEIcAd6zeaOe9IG0Dc9AcNFLC', 2, '714141681@qq.com', '15159398913', '1', '2019-06-14 20:39:22', '2021-10-17 21:05:38', '2021-10-22 17:32:27', '0', '1', 'white', 'https://img1.baidu.com/it/u=1897719880,2867606276&fm=26&fmt=auto', 'hh');
INSERT INTO `t_user` VALUES (15, 'hq1', '$2a$10$fJlitylw6VbicJg1JwL1ceAIX0STqEIcAd6zeaOe9IG0Dc9AcNFLC', 2, '714141681@qq.com', '15159398912', '1', '2019-06-11 20:39:22', '2021-10-17 21:05:58', '2021-10-22 16:41:36', '0', '1', 'white', 'https://img1.baidu.com/it/u=1897719880,2867606276&fm=26&fmt=auto', 'hh');
INSERT INTO `t_user` VALUES (16, '222464', '$2a$10$fJlitylw6VbicJg1JwL1ceAIX0STqEIcAd6zeaOe9IG0Dc9AcNFLC', 2, '714141681@qq.com', '15159398915', '1', '2019-06-09 20:39:22', '2021-10-16 21:01:06', '2021-07-04 21:36:26', '1', '1', 'white', 'https://img1.baidu.com/it/u=1897719880,2867606276&fm=26&fmt=auto', 'hh');
COMMIT;

-- ----------------------------
-- Table structure for t_user_connection
-- ----------------------------
DROP TABLE IF EXISTS `t_user_connection`;
CREATE TABLE `t_user_connection` (
  `user_name` varchar(50) NOT NULL COMMENT 'HQ系统用户名',
  `provider_name` varchar(20) NOT NULL COMMENT '第三方平台名称',
  `provider_user_id` varchar(50) NOT NULL COMMENT '第三方平台账户ID',
  `provider_user_name` varchar(50) DEFAULT NULL COMMENT '第三方平台用户名',
  `nick_name` varchar(50) DEFAULT NULL COMMENT '第三方平台昵称',
  `image_url` varchar(512) DEFAULT NULL COMMENT '第三方平台头像',
  `location` varchar(255) DEFAULT NULL COMMENT '地址',
  `remark` varchar(255) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`user_name`,`provider_name`,`provider_user_id`) USING BTREE,
  UNIQUE KEY `UserConnectionRank` (`user_name`,`provider_name`,`provider_user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='系统用户社交账户关联';

-- ----------------------------
-- Table structure for t_user_data_permission
-- ----------------------------
DROP TABLE IF EXISTS `t_user_data_permission`;
CREATE TABLE `t_user_data_permission` (
  `user_id` bigint NOT NULL,
  `dept_id` bigint NOT NULL,
  PRIMARY KEY (`user_id`,`dept_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='用户数据权限关联';

-- ----------------------------
-- Records of t_user_data_permission
-- ----------------------------
BEGIN;
INSERT INTO `t_user_data_permission` VALUES (1, 1);
INSERT INTO `t_user_data_permission` VALUES (1, 2);
INSERT INTO `t_user_data_permission` VALUES (1, 3);
INSERT INTO `t_user_data_permission` VALUES (1, 4);
INSERT INTO `t_user_data_permission` VALUES (1, 5);
INSERT INTO `t_user_data_permission` VALUES (1, 6);
INSERT INTO `t_user_data_permission` VALUES (15, 1);
INSERT INTO `t_user_data_permission` VALUES (15, 2);
COMMIT;

-- ----------------------------
-- Table structure for t_user_role
-- ----------------------------
DROP TABLE IF EXISTS `t_user_role`;
CREATE TABLE `t_user_role` (
  `user_id` bigint NOT NULL COMMENT '用户ID',
  `role_id` bigint NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`user_id`,`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='用户角色关联';

-- ----------------------------
-- Records of t_user_role
-- ----------------------------
BEGIN;
INSERT INTO `t_user_role` VALUES (1, 1);
INSERT INTO `t_user_role` VALUES (15, 2);
INSERT INTO `t_user_role` VALUES (16, 2);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
